import { Actor, Action, IMap } from 'plume2'

export default class UserActor extends Actor {
    defaultState() {
        return {
            userPhoto: '',
            nickName: '',
            levelName: ''
        }
    }

    @Action('user:init')
    userInit(state: IMap, userInfo) {
        return state.merge({ userPhoto: userInfo.userPhoto, nickName: userInfo.nickName, levelName: userInfo.levelName })
    }


}